/*!*********************************************************************************
 * X2Engine Open Source Edition is a customer relationship management program developed by
 * X2 Engine, Inc. Copyright (C) 2011-2019 X2 Engine Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY X2ENGINE, X2ENGINE DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact X2Engine, Inc. P.O. Box 610121, Redwood City,
 * California 94061, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2 Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2 Engine".
 **********************************************************************************/




@import "standards";

.x2-gridview-mass-action-outer {
    position: relative;
}

@media (max-width: 820px) and (min-width: 658px) {
    .grid-view.fullscreen .x2-gridview-top-pager {
        display: none;
    }
}

@include underThreshold ($mobileThreshold) {
    .grid-view {
        .x2-gridview-mass-action-outer {
            display: inline-block;
            position: relative;
            top: 21px;
            left: -50px;
        }
    }
}


/*
Check all records in data provider feature
*/
.grid-view .select-all-records-on-all-pages-strip-container {
    margin-right: -1px;
}
.grid-view .x2-gridview-fixed-top-bar-outer .select-all-records-on-all-pages-strip-container {
    margin-right: 6px;
    margin-left: 3px;
}

.grid-view .select-all-records-on-all-pages-strip-container {
    text-align: center;
    border-right: 1px solid rgb(207, 207, 207);
    border-bottom: 1px solid rgb(199, 199, 199);
    position: relative;
    z-index: 1;
}

.grid-view .select-all-records-on-all-pages-strip-container .select-all-notice,
.grid-view .select-all-records-on-all-pages-strip-container .all-selected-notice {
    padding: 4px;
}

.grid-view .select-all-records-on-all-pages-strip-container .select-all-notice {
    background: rgb(255, 255, 185);
}

.grid-view .select-all-records-on-all-pages-strip-container .all-selected-notice {
    background: rgb(203, 255, 201);
}

body.no-widgets .grid-view .x2-gridview-fixed-top-bar-outer .select-all-records-on-all-pages-strip-container {
    margin-right: 0;
}

.x2-mobile-layout .select-all-records-on-all-pages-strip-container {
    margin-left: 0;
    margin-right: -1px;
}

.grid-view .container-clone {
    visibility: hidden;
}

.x2-mobile-layout .x2grid-body-container .container-clone,
.x2grid-body-container.x2-gridview-body-without-fixed-header .container-clone {
    display: none !important;
}

/*
Flashes container
*/

.super-mass-action-feedback-box {
    margin: 5px 0;
    border: 1px solid rgb(176, 176, 176);
    background: rgb(250, 250, 250);
    box-shadow: inset 1px 1px rgb(219, 219, 219);
    padding: 4px;
    height: 76px;
    overflow-y: scroll;
}

.super-mass-action-feedback-box .success-flash {
    color: green;
}
.super-mass-action-feedback-box .error-flash {
    color: red;
}


body.show-widgets {
    #x2-gridview-flashes-container.fixed-flashes-container {
        left: 155px;
    }
}

#x2-gridview-flashes-container.fixed-flashes-container {
    position: fixed;
    opacity: 0.9;
    bottom: 5px;
    right: 0;
}

#x2-gridview-flashes-container {
    margin-top: 5px;
    margin-right: 5px;
}

#x2-gridview-flashes-container > div {
    margin-top: 5px;
    margin-left: 4px;
}

#x2-gridview-flashes-container .flash-list-header {
    margin-bottom: 4px;
}

#x2-gridview-flashes-container .x2-gridview-flashes-list {
    clear: both;
    margin-bottom: 5px;
}

#x2-gridview-flashes-container .flash-list-left-arrow,
#x2-gridview-flashes-container .flash-list-down-arrow {
    margin-left: 6px;
    margin-top: 3px;
}


/*
update fields dialog
*/

.x2-gridview-update-field-dialog select {
    margin-right: 4px;
    margin-top: 2px;
    margin-bottom: 2px;
}

.update-fields-inputs-container {
    margin-top: 4px;
}

.update-fields-inputs-container .update-fields-field-input-container {
    vertical-align: middle;
    margin-top: 0px;
}

.update-fields-inputs-container .updating-field-input-anim {
    margin-left: 40px;
}


/*
buttons 
*/

.mass-action-more-button-container .x2-down-arrow {
    margin-left: 30px;
    margin-top: 11px;
}

.mass-action-more-button-container .more-button-arrow {
    height: 5px;
}

.mass-action-more-button-container .more-button-label {
    display: inline !important;
    float: left;
    margin-right:5px;
}

.mass-action-more-button-container {
    height: 14px;
    margin: 0 5px 0 0;
    display: inline-block;
}

.mass-action-more-button-container button {
    display: inline;
    height: 26px;
    &.disabled {
        display: none;
    }
}


a.mass-action-button {
    height: 24px;
    width: 24px;
    line-height: 24px;
}

a.mass-action-button {
    margin-left: -4px !important;
}

a.mass-action-button:first-child {
    margin-left: 0px !important;
}

.mass-action-button-MassMoveToFolder span {
    background: url('../../../images/icons/move.png') 3px center no-repeat;
    height: 24px;
    width: 24px;
}



/*
more drop down list
*/


body > .grid-view-more-drop-down-list {
    position: absolute;
    &.stuck {
        position: absolute !important;
    }
    &.fixed-header {
        position: fixed;
    }
    top: 67px;
    z-index: 1000;
    list-style-type: none;
    background: #fff;
    border: 1px solid #999;
    -moz-box-shadow: 0 0 15px 0 rgba(0,0,0,0.5);
    -webkit-box-shadow: 0 0 15px 0 rgba(0,0,0,0.5);
    box-shadow: 0 0 15px 0 rgba(0,0,0,0.5);
    padding: 5px 0px 5px 0px;
    clip: rect(0px,1000px,1000px,-10px);
    li {
        line-height: 17px;
        padding: 0 10px 0 10px;
        cursor: default;
        color: black;
        &:hover {
            background: #eee;
        }
        &.disabled {
            display: none;
        }
    }
}

/*
general mass actions styling
*/

#mass-action-dialog-loading-anim {
    margin-right: 30px;
}

.x2-gridview-mass-action-buttons .dialog-help-text {
    margin-bottom: 5px;
}

.x2-gridview-mass-action-buttons {
    margin: 0 5px 0 0;
    display: inline-block;
}

div.mass-action-dialog {
    overflow: hidden !important;
    .multi-type-autocomplete-container { 
        input {
            width: 180px;
        }
    }
}


